package com.xiaomi.shwx.common.enums;

public enum WorkOrderStatus {
    CREATE("0","创建"),
    BE_CONFIRM("1","用户待确认" ),
    CONFIRM("2","用户已确认" ),
    CHECK("3","检测" ),
    RECHECK("4","复检" ),
    UNPAID("5","待支付"),
    PAID("6","已支付"),
    END("7","完结"),
    CANCEL("8","取消"),
    EXCEPTION("-1","异常");



    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private String status ;
    private String describe ;


    WorkOrderStatus(String status, String describe ){
        this.status = status;
        this.describe=describe;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public static WorkOrderStatus getByStatus(String status) {
        for (WorkOrderStatus workOrderStatus : values()) {
            if (workOrderStatus.getStatus().equals(status)) {
                return workOrderStatus;
            }
        }
        return null; // or throw an exception if status not found
    }
}
